<?php
/**
 * Encapsulates template name and passed model parameters
 */
class View {
	
	private $template;
	// smarty container
	private $model;
	
	/**
	 * Expects name of target template
	 */
	public function __construct($template) {
		$this->template = $template;
		$this->model = new Smarty();
	}
	
	/**
	 * Adds an object to view model
	 */
	public function add($key,$value) {
		$this->model->assign($key, $value);
	}
	
	public function getModel() {
		return $this->model;
	}
	
	public function getTemplate() {
		return $this->template;
	}
}
?>